Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Update file-manager.js #135

Merged
merged 1 commit into from
Sep 25, 2019
Merged

Update file-manager.js #135

merged 1 commit into from
Sep 25, 2019

Conversation

SeanC4
Copy link
Contributor

@SeanC4 SeanC4 commented Aug 30, 2019

Description

Hawkeye scanner does not run on Windows.
When certain modules run (eg: java-find-secbugs) the file-manager tries to get all files (getAllFilesSync). It replaces the filePath with a regex to produce a relative path
const relativePath = filePath.replace(this.targetRegex, '').
This doesn't work on Windows as the \ in the directory is a escape character. Reg ex fails and you end up with a path something like this:
D:\Code\D:\Code\Folder\ rather than D:\Code\Folder\

Fixes #131

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Toolchain

  • JavaScript

How Has This Been Tested?

[Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. List any dependencies that are required for this change.]

Test Configuration: hawkeye scan

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code

@felixhammerl
Copy link
Collaborator

This problem exists on many more places. I will create a more comprehensive change that addresses this problem in the modules as well.

@felixhammerl felixhammerl merged commit 90920ef into hawkeyesec:master Sep 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not Windows compatible
2 participants